package tuhu;

/**
 * @author xizizzz
 * @description: TODO
 * @date 2021-8-31下午 07:08
 */
public class Test1 {
    public static void main(String[] args) {
        final long l = totalRun(10);
        System.out.println(l);
    }

    public static long totalRun(int days) {
        int res = 0;
        int we = 100;
        int temp = 0;
        if (days <= 7) {
            for (int i = 1; i <= days; i++) {
                res += (temp + 100);
                temp += 100;
            }
            return res;
        } else {
            int index = 0;
            int tmp = 0;
            while (days > 0) {
                if (days >= 7) {
                    res += (2800 + index * 700);
                    days -= 7;
                    index++;
                } else {
                    tmp = (index + 1) * 100;
                    if (days == 1) {
                        return res + tmp;
                    } else if (days == 2) {
                        res = res + tmp * 2 + 100;
                        return res;
                    } else if (days == 3) {
                        return res + tmp * 3 + 300;
                    } else if (days == 4) {
                        return res + tmp * 4 + 300;
                    } else if (days == 5) {
                        return res + tmp * 5 + 400;
                    } else if (days == 6) {
                        return res + tmp * 6 + 500;
                    }
                }
            }
            return res;
        }
    }
}
